package com.lhl;

import com.lhl.classtype.ClsAdapter;
import com.lhl.classtype.ClsTarget;

/**
 * @author Liu Hanlin
 * @create 2024-09-30 21:59
 */
public class Main {
    public static void main(String[] args) {
        clsAdapterDemo();
        objAdapterDemo();
    }


    /**
     * 类适配器模式示例
     */
    public static void clsAdapterDemo(){
        ClsTarget adapter = new ClsAdapter();
        String request = adapter.request();
        System.out.println(request);
    }

    /**
     * 对象适配器模式示例
     */
    public static void objAdapterDemo(){
        ClsTarget adapter = new ClsAdapter();
        String request = adapter.request();
        System.out.println(request);
    }
}
